<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<head>
    <title>${result.YstInfo.DHMC}</title>
    <meta name="keywords" content="${result.YstInfo.DHGJC}"/>
    <meta name="description" content="${result.YstInfo.DHSM}"/>
    <link rel="stylesheet" type="text/css" href="<%=request.getContextPath()%>/res/css/style.css" >
</head>
<body>
    <%
	pageContext.setAttribute("basePath",request.getHeader("Referer"));
   %>

<div id="wrap1">
    <div id="header">
        <!--顶部开始-->
        <nav class="site-topbar">
            <div class="wraper">
                <ul class="nav-left">
                    <li><a href="#">首页</a></li>

                </ul>
                <ul class="nav-right">
                    <c:choose>
                         <c:when test="${result.YstUserInfo.YHBH!=null}">
                             <li class="userinfo">
                                 <a href="/login.html">${result.YstUserInfo.YHMC}</a>
                                 <div class="content">
                                     <div class="info">
                                         <a href="">
                                             <img src="${result.YstUserInfo.YHTX}" />
                                         </a>
                                         <a href="/user/logout.do">
                                            退出
                                         </a>
                                     </div>
                                 </div>
                             </li>
                         </c:when>
                        <c:otherwise>
                            <li><a href="/login.html?url=${pageScope.basePath}">登录</a></li>
                            <li><a href="/login.html?url=${pageScope.basePath}">注册</a></li>
                        </c:otherwise>
                    </c:choose>
                    <li class="buyCar">
                        <a class="i_car" href="">购物车（0）</a>
                        <div class="content"></div>
                    </li>
                </ul>
            </div>
        </nav>
        <!--顶部结束-->

        <!--搜索框开始-->
        <div class="search-wraper wraper">
            <div class="header-left">
                <img src="http://yst.zuanweisi.com/res/images/logo.png"/>
            </div>
            <div class="header-right">
                <input type="text" class="search" list="search-record" name="search">
                <button class="btn">搜索</button>
                <ul>
                    <li>小米手机5<span>约有11件</span></li>
                    <li>小米手机5<span>约有11件</span></li>
                    <li>小米手机5<span>约有11件</span></li>
                    <li>小米手机5<span>约有11件</span></li>
                    <li>小米手机5<span>约有11件</span></li>
                    <li>小米手机5<span>约有11件</span></li>
                    <li>小米手机5<span>约有11件</span></li>
                </ul>
            </div>
        </div>
        <!--搜索框结束-->
        <!--导航条开始-->
        <div class="nav">

            <div class="block">
                <ul>
                    <c:forEach items="${result.YstInfoNav}" var="YstInfoNavF">
                        <%--为0是主导航--%>
                        <c:if test="${YstInfoNavF.FID==0&&YstInfoNavF.XIANSHI==1}">
                            <li>
                                <a href="<%=request.getContextPath()%>/${YstInfoNavF.DHURL}">${YstInfoNavF.DHMC}</a>
                                <ul>
                                    <c:forEach items="${result.YstInfoNav}" var="YstInfoNavZ">
                                        <%--主导航获取子导航--%>
                                        <c:if test="${YstInfoNavF.ZID==YstInfoNavZ.FID&&YstInfoNavZ.XIANSHI==1}">
                                            <li> <a href="<%=request.getContextPath()%>/${YstInfoNavZ.DHURL}">${YstInfoNavZ.DHMC}</a></li>
                                        </c:if>
                                    </c:forEach>
                                </ul>
                            </li>
                        </c:if>

                    </c:forEach>
                </ul>
            </div>
        </div>
    </div>
    <!--导航条结束-->
